<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ page import="java.util.*" %>
    <%@ page import="com.niit.Student" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生列表信息</title>
<link rel="stylesheet" href="https://cdn.staticfile.net/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>

<%
List<Student> studentList = (List<Student>)request.getAttribute("data");
pageContext.setAttribute("studentList", studentList);
%>

<div class="container">
<h3>学生列表</h3>
<table class="table table-bordered text-center">
	<tr class="table-primary">
		<th>学号</th>
		<th>姓名</th>
		<th>年龄</th>
	</tr>	
	<c:forEach items="${studentList}" var="stu">
		<tr>
			<td>${stu.id}</td>
			<td>${stu.name}</td>
			<td>${stu.age}</td>
		</tr>
	</c:forEach>
</table>
</div>


</body>
</html>